<%-- 
    Document   : customer
    Created on : Mar 9, 2012, 10:11:42 PM
    Author     : Alex
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
           <%
            response.setHeader("Pragma","no-cache");
            response.setHeader("Cache-Control","no-store");
            response.setHeader("Expires","0");
            response.setDateHeader("Expires",-1);
        %>
        
          <%
         HttpSession test = request.getSession(false);
         if(test==null)
         {
         response.sendRedirect("index.jsp");    
         }
        
              
        if(session.getAttribute("user") == null)
            response.sendRedirect("index.jsp");
            

                   else{
        %>
    </head>
    <body>
        
        <% out.print("Welcome " +session.getAttribute("id")+ "");%>
           <% out.print("Welcome " +session.getAttribute("user")+ "");%>
        <h1>Customer Menu</h1> 
          <a href="ViewTransaction.jsp"> Logs   </a>
        <a href="BrowseProducts.jsp"> Browse Products </a>
        <a href="customerprofile.jsp"> View Profile </a>
         <a href="ReviewProducts.jsp"> Add review   </a>
           <a href="Reviews.jsp"> View Reviews  </a>
        <a href="UserLogoutServlet"> Logout </a>
        
        
        
    </body>
    <%
    }
    %>

</html>
